-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[PM-23713] premium badge interaction #16911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
removed toast service from the pricing service and implemented error handling in calling components # Conflicts: # apps/web/src/app/billing/individual/upgrade/upgrade-payment/upgrade-payment.component.ts
# Conflicts: # apps/web/src/app/billing/individual/upgrade/upgrade-payment/upgrade-payment.component.ts # libs/common/src/enums/feature-flag.enum.ts
|
Claude finished @kdenney's task —— View job Code Review CompleteI've conducted a comprehensive review of this PR. Overall, this is a well-architected feature with good test coverage and thoughtful implementation. The recent commits have addressed previous reviewer feedback well. Below are my findings: Summary of ChangesThis PR implements feature-flagged premium badge interactions across Web, Browser, and Desktop clients:
Key architectural changes:
Critical Issues1. 🔴 Potential Null Pointer Exception in
|
|
Great job! No new security vulnerabilities introduced in this pull request |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #16911 +/- ##
==========================================
+ Coverage 40.46% 40.47% +0.01%
==========================================
Files 3496 3506 +10
Lines 99960 100140 +180
Branches 14979 15005 +26
==========================================
+ Hits 40452 40535 +83
- Misses 57793 57886 +93
- Partials 1715 1719 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
# Conflicts: # apps/browser/src/_locales/en/messages.json
# Conflicts: # apps/desktop/src/app/tools/send/add-edit.component.ts
# Conflicts: # libs/pricing/src/components/pricing-card/pricing-card.component.ts
| map((tiers) => tiers.find((tier) => tier.id === PersonalSubscriptionPricingTierIds.Premium)), | ||
| map((tier) => this.mapPremiumTierToCardDetails(tier!)), | ||
| catchError((error: unknown) => { | ||
| this.toastService.showToast({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When an error occurs, the dialog shows a toast but remains open with no content. The user has to manually close a seemingly broken dialog. Is this the expected experience ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I added a line to close the dialog when this error occurs in 2abc88c

🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-23713
📔 Objective
This PR modifies the behavior of the premium badge in the following ways when the feature flag
pm-23713-premium-badge-opens-new-premium-upgrade-dialogis enabled:To achieve this, several changes were made in locations where the premium badge was (or should have been) used, including:
PremiumUpgradePromptServicein every case.has-premium.guardThe new dialog
PremiumUpgradeDialogComponentwas created in libs/angular so that it could be used in both Browser and Desktop. This required moving theSubscriptionPricingServiceto libs/common and creating an abstraction for it and moving to libs required removing the ToastService usage from the pricing service and moving that logic to the components that use it instead.The new dialog uses the pricing card component from libs/pricing but needed to customize some minor styles about how the card component renders. Two new customization properties were added to the card component to achieve this:
disableCardPaddingTopanddisableCardBorder.A few other changes were made that require explanations and comments have been added to the files in this PR for those.
📸 Screenshots
Desktop dialog light mode:

Desktop dialog dark mode:

Browser dialog light mode:

Browser dialog dark mode:

Web vault reports page (did not use premium badge before, does now):

Video of the dialog being used in desktop:
desktop.video.mov
Video of the dialog being used in browser:
browser.video.mov
Video of the premium badge interaction in cloud-hosted web vault:
web-video.mov
Video of the premium badge going away after upgrading in the cloud-hosted web vault:
web-sync-after-upgrade.mov
Video of the premium badge redirecting to the subscription page in self-host web vault:
web.self.host.video.mov
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:) or similar for great changes:memo:) or ℹ️ (:information_source:) for notes or general info:question:) for questions:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:) for suggestions / improvements:x:) or:warning:) for more significant problems or concerns needing attention:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt:pick:) for minor or nitpick changes